package com.eshop.modules.system.service;

import org.springframework.security.core.authority.SimpleGrantedAuthority;
import java.util.Collection;
import com.eshop.modules.system.service.dto.UserDto;
import java.util.Set;
import com.eshop.modules.system.service.dto.RoleSmallDto;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.eshop.modules.system.service.dto.RoleDto;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Pageable;
import com.eshop.modules.system.service.dto.RoleQueryCriteria;
import com.eshop.modules.system.domain.Role;
import com.eshop.common.service.BaseService;

public interface RoleService extends BaseService<Role>
{
    Map<String, Object> queryAll(final RoleQueryCriteria criteria, final Pageable pageable);
    
    Object queryAlls(final RoleQueryCriteria criteria, final Pageable pageable);
    
    List<Role> queryAll(final RoleQueryCriteria criteria);
    
    void download(final List<RoleDto> all, final HttpServletResponse response) throws IOException;
    
    List<RoleSmallDto> findByUsersId(final Long id);
    
    Integer findByRoles(final Set<Role> roles);
    
    RoleDto findById(final long id);
    
    void updateMenu(final Role resources, final RoleDto roleDto);
    
    RoleDto create(final Role resources);
    
    void update(final Role resources);
    
    Collection<SimpleGrantedAuthority> mapToGrantedAuthorities(final UserDto user);
    
    void delete(final Set<Long> ids);
}
